define(['angular', 'app.directives','services/partone/partone_service'], function (angular, directives) {
    'use strict';

    directives.directive("getName", ['$q','$http','$location','$stateParams','$uibModal','testService', function ($q,$http,$location,$stateParams,$uibModal,testService) {
        return {
            restrict: 'E',
            scope: {},
            replace: true,
            templateUrl: function () {
                return "/app/partial/partone/pageone_2.html";
            },
            link: function ($scope) {
                $scope.name="this is a scope name";
                var handleResponse=function(data){
                }
                function randomNameJsonpCallBack(data){
                    success(data);
                }
                $scope.clickBtn=function(){
                    var url="http://recommd.xyq.cbg.163.com/cgi-bin/recommend.py?callback=JSON_CALLBACK&_=1516863374191&school=4&act=recommd_by_role&page=1&order_by=level%20DESC&count=15&search_type=overall_search_role";
                    $http({
                        method : 'JSONP',
                        url : url,
                        params :{school: "1,2,4" },//callback:"JSON_CALLBACK" 必须存在
                        headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                    }).success(function(data){
                        $scope.accountData=data.equips;
                    })
                }
            }
        }
    }]);
});